#include<iostream>
using namespace std;
typedef long long LL;
const int N = 2e5 + 10;
int arr[N];
int n;
LL t;
int main()
{
	cin >> n >> t;
	for (int i = 0; i < n; i++) {
		cin >> arr[i];
	}
	int ans = 0;
	int i = 0;
	while (t) {
		if (arr[i] <= t) {
			ans++;
			t -= arr[i];
		}
		else {
			bool flag = 0;
			for (int j = 0; j < n; j++) {
				if (arr[j] <= t) {
					flag = 1;
					break;
				}
			}
			if (!flag) {
				break;
			}
		}
		i++;
		if (i == n) {
			i = 0;
		}
	}
	cout << ans << endl;
	return 0;
}
